//
//  BPViewController.m
//  BPRoutes
//
//  Created by xuhongji on 09/04/2020.
//  Copyright (c) 2020 xuhongji. All rights reserved.
//

#import "BPViewController.h"
#import "JLRoutes+BPGenerateURL.h"
#import "BPRouteHelper.h"
@interface BPViewController ()

@end
NSString *const BPAppRoute = @"/:username/:age";
@implementation BPViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
	// Do any additional setup after loading the view, typically from a nib.
}

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event{
    [self test];
}

- (void)test {
    NSString *router = [JLRoutes BP_GenerateURLWithPattern:BPAppRoute parameters:@[@"lilei",@"18"] extraParameters:@{@"sex":@"male"}];
    NSURL *url = BPRouteURL(@"route", router);
    [BPRouteHelper openURL:url];
    
    NSLog(@"hahah");
}

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
